package com.itfreer.form.dao.metadata;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;

import org.springframework.beans.BeanUtils;

import com.itfreer.form.api.JdbcBaseEntity;
import com.itfreer.form.dao.base.JdbcTreeEntityBase;
import com.itfreer.form.entity.metadata.MetadataDirectoryEntity;

/**
 * 类功能说明 定义结构表实体
 */
@Entity(name = "form_metadata_directory")
public class JdbcMetadataDirectoryEntity extends JdbcTreeEntityBase implements JdbcBaseEntity<MetadataDirectoryEntity>, Serializable {

	private static final long serialVersionUID = -7033077256329888297L;
	
	@Column(name = "s_directoryType", length = 2, nullable = true)
	private String directoryType;
	
	public String getDirectoryType() {
		return directoryType;
	}

	public void setDirectoryType(String directoryType) {
		this.directoryType = directoryType;
	}

	@Override
	public MetadataDirectoryEntity toEntity() {
		MetadataDirectoryEntity toEntity = new MetadataDirectoryEntity();
		BeanUtils.copyProperties(this, toEntity);
		return toEntity;
	}

	@Override
	public void from(MetadataDirectoryEntity t) {
		BeanUtils.copyProperties(t, this);
	}
}